import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;

public class AddStaff extends JPanel {
	private JButton clear, addition;
	private JLabel firstName, lastName, address, city, state, zip, ssn, birthDate, job, title, sex, header;
	private JTextField fn, ln, ad, add, addr, ci, st, zi, ss, bd, jo;
	private JPanel bt, info1, info2, info3, info, top;
	private String[] title1 = {"Mr.", "Mrs.","Jr.","Miss","Sr,"};
	private String[] sex1 = {"Male", "Female"};
	private JComboBox CB = new JComboBox(title1);;
	private JComboBox CB1 = new JComboBox(sex1);
	public AddStaff(int length, int width)
	{
		//initialize
		clear = new JButton("Clear");
		addition = new JButton("Add");

		fn = new JTextField("");
		ln = new JTextField("");
		ad = new JTextField("");
		ci = new JTextField("");
		st = new JTextField("");
		zi = new JTextField("");
		ss = new JTextField("");
		bd = new JTextField("");
		jo = new JTextField("");

		firstName = new JLabel("First Name:");
		lastName  = new JLabel("Last Name:");
		address  = new JLabel("Address:");
		title = new JLabel("Title:");
		sex =  new JLabel("Sex:");
		city =  new JLabel("City:");
		state =  new JLabel("State:");
		zip =  new JLabel("Zip:");
		ssn =  new JLabel("SSN:");
		birthDate =  new JLabel("Birth Date:");
		job =  new JLabel("Job:");
		header =  new JLabel("Add New Staff Member");

		top = new JPanel();
		top.add(header);

		bt = new JPanel();
		bt.setLayout(new GridLayout(1,2));
		bt.add(clear);
		bt.add(addition);

		info1 = new JPanel();
		info1.setLayout(new GridLayout(2,4));
		info1.add(firstName);
		info1.add(fn);
		info1.add(title);
		info1.add(CB);
		info1.add(lastName);
		info1.add(ln);
		info1.add(sex);
		info1.add(CB1);

		info2 = new JPanel();
		info2.setLayout(new GridLayout(3, 2));
		info2.add(address);
		info2.add(ad);
		info2.add(empty);
		info2.add(add);
		info2.add(empty);
		info2.add(addr);

		info3 = new JPanel();
		info3.setLayout(new GridLayout(3,4));
		info3.add(city);
		info3.add(ci);
		info3.add(state);
		info3.add(st);
		info3.add(zip);
		info3.add(zi);
		info3.add(ssn);
		info3.add(ss);
		info3.add(birthDate);
		info3.add(bd);
		info3.add(job);
		info3.add(jo);

		info = new JPanel();
		info.setLayout(new BorderLayout());
		info.add(info1, BorderLayout.NORTH);
		info.add(info2, BorderLayout.CENTER);
		info.add(info3, BorderLayout.SOUTH);

		//main layout
		setLayout(new BorderLayout(this, BorderLayout());
		add(top, BorderLayout.NORTH);
		add(info.BorderLayout.CENTER);
		add(bt.BorderLayout.SOUTH);
	}
}